package rainQuality.servlet.impl;

import rainQuality.dao.impl.RainManageDaoImpl;
import rainQuality.entity.RainManage;
import rainQuality.dao.RainManageDao;
import rainQuality.servlet.RainManageService;

import java.util.List;

public class RainManageServiceImpl implements RainManageService {
    @Override
    public List<RainManage> select() {
        RainManageDao rainManageDao=new RainManageDaoImpl();
        return rainManageDao.select();
    }

    @Override
    public int sc(String id) {
        int count=0;
        if(id!=null){
            RainManageDao rainManageDao=new RainManageDaoImpl();
            count=rainManageDao.sc(id);
        }else{
            count=-1;
        }
        return count;
    }

    @Override
    public int Xz(RainManage rainManage) {
        int count=0;
        if(rainManage!=null){
            RainManageDao rainManageDao=new RainManageDaoImpl();
            count=rainManageDao.Xz(rainManage);
        }else{
            count=-1;
        }
        return count;
    }


}
